/*
 * @Author: wangming
 * @Date: 2020-09-07 11:54:44
 * @LastEditors: wangming
 * @LastEditTime: 2022-08-03 11:24:33
 * @Description: file content
 */
/**
 * 基础组件
 */
import stores from "store2";

const baseTag = [
  {
    value: 'hlInput',
  },
  {
    value: 'hlPassword',
  },
  {
    value: 'hlTextarea',
  },
  {
    value: 'hlLink',
  },
  {
    value: 'hlTag',
  },
  {
    value: 'hlExplain',
  },
  {
    value: 'hlInputNumber',
  },
  {
    value: 'hlMoneyInput',
  },
  {
    value: 'hlCalculation',
  },
  {
    value: 'hlUppercase',
  },
  {
    value: 'hlModelSelect',
  },
  {
    value: 'hlSelect',
  },
  {
    value: 'hlSelectTree',
  },
  {
    value: 'hlRadio',
  },
  {
    value: 'hlCheckbox',
  },
  {
    value: 'hlSwitch',
  },
  {
    value: 'hlPersonnel',
  },
  {
    value: 'hlDepartment',
  },
  {
    value: 'hlDatePicker',
  },
  {
    value: 'hlTimePicker',
  },
  // {
  //   value: 'hlCascader',
  // },
  {
    value: 'hlFile',
  },
  {
    value: 'hlFileImage',
  },
  // {
  //   value: "hlQrcodeDecoder"
  // }
  {
    value: "hlColorPicker",
    beforeCreate(tag) {
      const color = stores.get("_hancode_theme_")?.color
      tag.defaultValue = color;
    },
  }
];
const baseLayout = [
  {
    value: 'hlLayout',
  },
  {
    value: 'hlLayoutTab',
  },
  {
    value: 'hlLayoutItem',
  },
  {
    value: 'hlrowLayoutTwo',
  },
  {
    value: 'hlcolumnLayoutTwo',
  },
  {
    value: 'hlrowLayoutThree',
  },
  {
    value: 'hlcolumnLayoutThree',
  },
];
export const baseModules = [
  {
    label: '基础组件',
    list: baseTag,
  },
  {
    label: '布局组件',
    list: baseLayout,
  },
];
export const baseBtnModules = [
  {
    label: '列表页面按钮',
    list: [
      {
        value: 'addBtn',
      }
    ],
  },
];

export const iframeModules = [
  {
    label: '表单组件',
    list: [
      { value: 'hlLayoutForm' },
      { value: 'hlChildTb' },
      ...baseTag,
      // { value: 'hlCustom' },
      { value: 'hlVueComponent' },
      { value: 'hlProcess' },
    ],
  },
  {
    label: '布局组件',
    list: [...baseLayout],
  },
  {
    label: '其他组件',
    list: [
      {
        value: 'hlcustomBtn',
      },
      {
        value: 'hlStep',
      },
      {
        value: 'hlSearch',
      },
      {
        value: 'hlDivider',
      },
    ],
  },
  {
    label: '数据展示组件',
    list: [
      {
        value: 'hlTableList',
      },
      {
        value: 'hlTableForChildren',
      },
      {
        value: 'hlTableForRelation'
      },
      {
        value: 'hlMindmap',
      },
      {
        value: 'hlTree',
      },
      { value: 'hlCalendar' },
      { value: 'hlQrcode' },
      { value: 'hlWorkflow' },
      { value: 'hmVideoMedia' },
      { value: 'hmImageMedia' },
    ],
  },
  {
    label: '容器组件',
    list: [
      {
        value: 'hliframe',
      },
    ],
  },
  {
    label: '图表组件',
    list: [
      {
        value: 'eCustomChart',
      },
      // {
      //   value: 'eBarChart',
      // },
      // {
      //   value: 'ePieChart',
      // },
    ],
  },
];
